import { createApp } from 'vue'

import '@/style/reset.scss'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'



//@ts-ignore
import zhCn from 'element-plus/es/locale/lang/zh-cn'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//引入vue-router核心插件并安装
import router from '@/router';

//引入pinia仓库
import pinia from '@/store'

//引入全局组件--顶部、底部都是全局组件
import HospitalTop from '@/components/hospital_top/index.vue';

import HosiptalBottom from '@/components/hospital_bottom/index.vue';

import Login from '@/components/login/index.vue';

import Visitor from '@/components/visitor/visitor.vue';
import App from '@/App.vue'
const app = createApp(App);
app.component('HospitalTop', HospitalTop);
app.component('HosiptalBottom', HosiptalBottom);
app.component('Login', Login);
//就诊人全局组件
app.component('Visitor',Visitor);
//安装vue-router
app.use(router);
//安装pinia
app.use(pinia);
// for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
//     app.component(key, component)
// }
app.use(ElementPlus, {
    locale: zhCn,
})
//引入路由鉴权的文件
import './permisstion'
app.mount('#app')
